package com.lanren.imgxy;

public class XyMain {

    public static void main(String[] args) {
        System.out.println("获取图片xy坐标");
        int x = 728;
        int y = 405;
        int num = 5;
        int xNum = x / num;
        int yNum = y / num;

        System.out.println("xNum=" + xNum + "  yNum" + yNum);

        int xPath = 0;
        int yPath = 0;

        String[][] map = new String[yNum][xNum];

        for (int i = 0; i < xNum; i++) {
            xPath = xPath + 5;
            System.out.println("xPath=" + xPath + " " + i);
        }

        for (int i = 0; i < yNum; i++) {
            yPath = yPath + 5;
            System.out.println("yPath=" + yPath + " " + i);
        }

        xPath = 0;
        yPath = 0;

        for (int i = 0; i < yNum; i++) {
            yPath = yPath + 5;
            xPath = 0;
            for (int i1 = 0; i1 < xNum; i1++) {
                xPath = xPath + 5;
                map[i][i1] = xPath + "," + yPath;
            }
        }

        for (int i = 0; i < map.length; i++) {
            System.out.println("{");
            for (int j = 0; j < map[i].length; j++) {
                System.out.print(map[i][j] + " ");
            }
            System.out.println("}");
        }

    }
}
